<?php

/**
 * @file
 * Custom theme implementation to display a single Drupal page.
 */

?>

<!-- Navbar -->
<div id="navbar" class="navbar navbar-medium navbar-inverse navbar-static-top">
  <div class="navbar-inner">
    <div class="container">
      <div class="header-links pull-right">
        <?php if ($secondary_menu): ?>
          <?php print '欢迎使用撒可富数字农化平台！' ?>
          <?php if ($logged_in) : ?>
            <?php print $page['alert_messages'] ?>
          <?php endif ?>
          <?php foreach ($secondary_menu as $item): ?>
            <?php print l($item['title'], $item['href']) ?>
          <?php endforeach ?>
        <?php endif ?>
      </div>
    </div>
  </div>
</div>


<!-- Header -->
<header id="header" class="container-wrapper">
  <div class="container">
    <a href="<?php print check_url($front_page) ?>">
      <div class="logo">
        <img src="<?php print base_path() . drupal_get_path('theme', 'tweme') . '/images/logo.png'; ?>"/>
      </div>
    </a>
    <?php if ($page['search']): ?>
      <?php print render($page['search']) ?>
    <?php endif ?>
    <!--    --><?php //if ($preface): ?>
    <!--      --><?php //print $preface ?>
    <!--    --><?php //endif ?>
  </div>
</header>


<!-- Main -->
<div id="front-main">
  <?php if ($page['main_menu']): ?>
    <!-- Main Menu -->
    <div id="main_menu" class="container-wrapper hidden-phone">
      <!--      <div class="container">-->
      <?php print render($page['main_menu']) ?>
      <!--      </div>-->
    </div>
  <?php endif ?>
  <div class="container">
    <?php print $messages ?>
    <?php if ($has_sidebar_first): ?>
      <!-- Sidebar first -->
      <aside id="sidebar-first" class="sidebar span3 hidden-phone">
        <?php print render($page['sidebar_first']) ?>
        <?php print render($page['sidebar_first_affix']) ?>
      </aside>
    <?php endif ?>
  </div>
</div>

<!--<div class="agricultural-page">-->
<!--  <div class="level-two-title">农业动态</div>-->
<!--    <div class="big-agricultural">-->
<!--      --><?php //print views_embed_view('front_agricultural_active_big_image','page');?>
<!--    </div>-->
<!--    <div class="small-agricultural">-->
<!--        <div class="small-title">》最新资讯《</div>-->
<!--        --><?php //print views_embed_view('front_agricultural_active','page');?>
<!--    </div>-->
<!--</div>-->
<br/><br/>
<div class="knowledge-page">
  <div class="level-two-title">农业动态</div>
  <?php print views_embed_view('info_center','page','news');?>
</div>
<div class="knowledge-page">
  <div class="level-two-title">农技知识</div>
  <?php print views_embed_view('info_center','page','knowledge');?>
</div>
<div class="knowledge-page">
  <div class="level-two-title">农资市场</div>
  <?php print views_embed_view('info_center','page','market');?>
</div>
<?php if ($page['footer']): ?>
  <!-- footer -->
  <footer id="footer" class="container-wrapper">
    <div class="container">
      <?php print render($page['footer']) ?>
    </div>
  </footer>
<?php endif ?>

